# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-recipe-scrapers
pkgver=15.2.1
pkgrel=0
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=recipe-scrapers
pkgdesc="Python package, scraping recipes from all over the internet"
url="https://pypi.python.org/project/recipe-scrapers"
arch="noarch"
license="MIT"
depends="py3-beautifulsoup4 py3-extruct py3-isodate"
checkdepends="py3-pytest"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
source="$pkgname-$pkgver.tar.gz::https://github.com/hhursev/recipe-scrapers/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer "$builddir"/.dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
9d63635bd126bad215f4b77f887769f646a34267dcc68c1f6be44063e5ebadcbf1cf43cdf9402f856ffd9c2dbff6d783d446b986bc0610680bf3b394d4946cf2  py3-recipe-scrapers-15.2.1.tar.gz
"
